package com.example.chat.service

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit

@Module
@InstallIn(SingletonComponent::class)
class WebServiceProvider {
    @Provides
    fun topicService(retrofit: Retrofit): TopicService = retrofit.create(TopicService::class.java)

    @Provides
    fun messageService(retrofit: Retrofit): MessageService = retrofit.create(MessageService::class.java)

}